﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace Pixysoft.Framework.Reflection.Core
{
    class DynamicMethodMessage : IDynamicMethodMessage
    {
        MethodInfo methodInfo;

        public DynamicMethodMessage(MethodInfo info)
        {
            this.methodInfo = info;
        }

        public MethodInfo MethodInfo
        {
            get { return methodInfo; }
        }

        public string MethodName
        {
            get { return methodInfo.Name; }
        }

        public string TypeName
        {
            get { return methodInfo.DeclaringType.FullName; }
        }

        public virtual void Dispose()
        {
            this.methodInfo = null;
        }
    }
}
